<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.0.0.042823
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2023/5/15
 * Time: 15:42
 */

namespace app\model;

use think\Model;

class PartnerUser extends Model
{
    /**
     * 关联角色表
     * @return \think\model\relation\BelongsTo
     */
    public function role(){
        return $this->belongsTo(PartnerRole::class,'role_id')->bind(['role_name'=>'name']);
    }

    /**
     * 关联角色表
     * @return \think\model\relation\BelongsTo
     */
    public function company(){
        return $this->belongsTo(Company::class)->bind(['company_name'=>'name']);
    }
}